#pragma once
#include <d3d9.h>
#include <d3dx9.h>
#include "Input.h"

class Camera
{
	/////////////////////////////////////////////////////////////////////////////////////////////////////
	/*Matrices*/
	/////////////////////////////////////////////////////////////////////////////////////////////////////

	/*The matrix for the view, used to create the image rendered*/
	D3DXMATRIX m_ViewMat;

	/*The matrix for the Projection, used to create the image rendered*/
	D3DXMATRIX m_ProjMat;

	/*The matrix that is a concatination of both the view and projection matrices*/
	D3DXMATRIX m_ViewProjMat;

	/////////////////////////////////////////////////////////////////////////////////////////////////////
	/*VECTORS (Both 2D, 3D and potentially Quaternions*/
	/////////////////////////////////////////////////////////////////////////////////////////////////////

	/*The right unit vector to determine the right direction of the camera*/
	D3DXVECTOR3 m_RightVec;

	/*The position of the camera*/
	D3DXVECTOR3 m_EyePos;

	/*The direction that the camera is facing*/
	D3DXVECTOR3 m_LookAt;

	/*The up vector that is used to determine the Up direction of the camera*/
	D3DXVECTOR3 m_UpVec;

	/////////////////////////////////////////////////////////////////////////////////////////////////////
	/*Normal Data Types that are ordered from the Highest to lowest in bit size*/
	/////////////////////////////////////////////////////////////////////////////////////////////////////

	/*The cameraSpeed that manipulates how fast the camera moves*/
	float m_CameraSpeed;

	/*The camera Pitch that controls the Up and down movement for the camera*/
	float m_CameraPitch;

	/*The cameraYAngle that controls the left and right movement for the camera*/
	float m_CameraYAngle;

	/*The width of the window for resizing*/
	int m_Width;

	/*The height of the window for resizing*/
	int m_Height;

	/////////////////////////////////////////////////////////////////////////////////////////////////////
	/*Pointers and Handles*/
	/////////////////////////////////////////////////////////////////////////////////////////////////////

	/*Pointer to the Input Object*/
	Input* m_Input;

public:

	/*The default Constructor*/
	Camera(void);

	/*The default Destructor*/
	~Camera(void);

	/*The Initialize function to create all of our objects and things that need to be rendered*/
	void Initialize(int height, int width, Input* in);

	/*The function that will create the View Matrix*/
	void createViewMat();

	/*The function that will create the Projection Matrix*/
	void createProjMat();

	/*The function returns the view matrix*/
	D3DXMATRIX getView();

	/*The function returns the Proj matrix*/
	D3DXMATRIX getProj();

	/*The function returns the viewProj matrix*/
	D3DXMATRIX getViewProj();

	/*The function returns the Right vector*/
	D3DXVECTOR3 getRight();

	/*The function returns the Up vector*/
	D3DXVECTOR3 getUp();

	/*The function returns the look vector*/
	D3DXVECTOR3 getLook();

	/*The function returns the position of the camera*/
	D3DXVECTOR3 getPos();

	/*The function sets the position of the camera*/
	void setPos(D3DXVECTOR3 pos);

	/*The function sets the speed of the camera*/
	void setSpeed(float speed);

	/*Update Everything for the Camera*/
	void update(float dt);

};

